package com.zhhs.jzcd.materialtype.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhhs.framework.aspectj.lang.annotation.Excel;
import com.zhhs.framework.web.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 素材类型对象 base_material_category
 *
 * @author ruoyi
 * @date 2023-08-03
 */
public class BaseMaterialCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 1话术2图片3视频 */
    @Excel(name = "1话术2图片3视频")
    private String mediaType;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String name;

    /** 父分类的id */
    @Excel(name = "父分类的id")
    private Long parentId;

    private List<BaseMaterialCategory> children = new ArrayList<BaseMaterialCategory>();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setMediaType(String mediaType)
    {
        this.mediaType = mediaType;
    }

    public String getMediaType()
    {
        return mediaType;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public List<BaseMaterialCategory> getChildren() {
        return children;
    }

    public void setChildren(List<BaseMaterialCategory> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("mediaType", getMediaType())
            .append("name", getName())
            .append("parentId", getParentId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
